<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head></h:head>

<body>
	<p:commandButton id="showDialogButton" type="button" value="Show"
		onclick="dlg.show()" />

	<p:dialog header="Enter FirstName" widgetVar="dlg" resizable="false">
		<h:form id="form">

			<h:panelGrid columns="2" style="margin-bottom:10px">
				<h:outputLabel for="firstname" value="Firstname:" />
				<p:inputText id="firstname" value="#{pprBean.firstname}" />
			</h:panelGrid>

			<p:commandButton id="submitButton" value="Submit" update=":display"
				oncomplete="dlg.hide();" />

		</h:form>
	</p:dialog>

	<p:outputPanel id="display" style="display:block;margin-top:10px;">
		<h:outputText id="name" value="Hello #{pprBean.firstname}"
			rendered="#{not empty pprBean.firstname}" />
	</p:outputPanel>



</body>
</html>
